.. _AppendixA: Appendix A: Helper Software =========================== The subversion/git repository contains some software packages which can be used to decode the bunches in the UDP packets received from the TiCkS. All of these may be re-implemented in whatever code the users prefers, of course. - TiCkS_decode: contains the routines for: - Decoding a bunch into individual events - Printing individual events or writing them to file in CDTS structure, and checking for errors - Reading in a configuration xml file - TiCkS_standalone: main routine and Makefile (with some example configs) for: - Receiving UDP packets from a TiCkS at a given IP / Port, or all TiCkS at a given Port by calling the routines in TiCkS_decode - Depending on the options in the configuration XML (given on command line) - Prints events to stdout and/or writes to file - Prints errors to stdout or stderr, or none - Prints a debug dictionary of delta Event/Busy/Time to stdout - Optionally correct skipped event counters - cdtsServerSimulator: - Receives UDP packets from a TiCkS at a given IP / Port, or all TiCkS at a given Port by calling the routines in TiCkS_decode - Connects to cameraServer (address given in the configuration XML on command line), and sends event in TCP/IP packets - If the option is chosen in the configuration XML (given on command line), prints errors to stderr - Optionally correct skipped event counters Some details ------------ - Debugging lines with printing to stderr or stdout (user choice) of: - Events with busyFlag != busyBit - Events with SPI time-out - Events with non-monotonic event counter increase (sum of read-out + busy counters) - Possibility to apply error correction for non-monotonic event counter increase, if this is within a margin of error - (i.e. lost packets will give big jumps, which should not be corrected) - Technical detail, the software will work correctly even for multiple TiCkS sending to a IP on multiple ports, or sending to the same port on multiple IPs - This is done by using a "ulhash" hash table to keep previous values of counters, timestamps for the given TiCkS IP/Port combination... a very nice and widespread package! - Configured by some values in in the config xml file (but with a default to 0 for integer values), ``err_output`` and ``cor_margin`` - see example below - Completely replaced mini-xml by libxml2 - much more standard than mini-xml (and is used by gnome) - easier to configure with "xml2-config" command in the Makefile - !!! With change from mini-xml to libxml2, must add top level enclosure tags - Moved getConfigurationFromXmlFile to TiCkS_decode - makes this much easier to call from other codes Configuration XML file example: ------------------------------- :: 10.10.3.250 55501 10.10.3.250 12345 0 0 0 0 0 0 ../TiCkS_data *Notes:* - Any node which isn't defined is set to a sensible default value - The first two nodes have to be there, with relevant values - To receive several TiCkS at once - then either send them to the same port and leave ucts_address blank - or send them to the same ucts_address and the same port - Normal operation so far is to execute each cdtsServer with a dedicated Port all on the same machine - This fits well with the paradigm of having the cdtsServer being part of the camera - In this paradigm, it should run on the Camera Server machine, and send its UCTS-timeStamp events to the SWAT - Optionally sending UCTS-timeStamp events to the Camera Event Builder in parallel